<template>
  <div class="main-container-app">

    <el-row class="form-contain">
      <f-data-child-form @tableLoad="tableLoad"
                         @tableData="tableData"
                         :pageNum="pageNum"
                         :pageSize="pageSize"
                         :ranNum="ranNum">
      </f-data-child-form>
    </el-row>
    <el-row class="table-contain">
      <f-data-child-table
        @pageNums="pageNums"
        @sizePage="changePageSize"
        :loading="loading"
        :tableDatas="tableDatas">
      </f-data-child-table>
    </el-row>
  </div>
</template>

<script>
  /* eslint-disable */
  import fDataChildForm from './finacialDataChild/fDataChildForm'
  import fDataChildTable from './finacialDataChild/fDataChildTable'
  export default {
    data() {
      return {
        ranNum: 0,
        pageNum: 1, // 当前页码
        pageSize: 10,
        tableDatas: [], // 表单数据
        loading: false, // 表格加载效果
      }
    },
    methods: {
      /* 表格loading效果 */
      tableLoad: function (val) {
        this.loading = val
      },
      /* 表单数据 */
      tableData: function (val) {
        this.tableDatas = val
      },
      /* 传递当前页码 */
      pageNums: function (val) {
        this.pageNum = val
      },
      changePageSize: function (val) {
        this.pageSize = val
      },
      /* 执行完操作后触发查询 */
      tiggerSearch: function (val) {
        this.ranNum = val
      }
    },
    components: {
      fDataChildForm,
      fDataChildTable
    }
  }
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard-editor-container {
    padding: 32px;
    background-color: rgb(240, 242, 245);
    height: 85vh;
  }
</style>
